<?

function imagesOnFileListFileIteration($file) {
    $IMAGE_EXTENSIONS = Config::getValue('limits','IMAGE_EXTENSIONS');
    if (in_array($file->getExt(),$IMAGE_EXTENSIONS)) {
        return $file;
    } else {
        return null;
    }
}

Event::registerEventHandler('FILELIST_FILE_ITERATION','imagesOnFileListFileIteration');

?>